from django.conf.urls import url, include
from . import views
# name='register'
urlpatterns = [

    url(r'register/$',views.RegisterView.as_view(),name='register'),
    url(r'usernames/(?P<username>[a-zA-Z0-9_-]{5,20})/count/$',views.Usernamecheck.as_view()),
    url(r'login/$',views.LoginViev.as_view(),name='login'),
    url(r'^loginout/$',views.LoginOut.as_view(),name='logout'),
    url(r'^center11/$', views.UserCener.as_view(),name='center'),
    url(r'emails/$',views.EmailView.as_view()),
    url(r'^emails/verification/$',views.Active_Email.as_view()),
    # 展示用户地址
    url(r'^addresses/$', views.AddressView.as_view(), name='address'),
    # 新增用户地址
    url(r'^addresses/create/$', views.AddressCreateView.as_view()),
    # 更新和删除地址
    url(r'^addresses/(?P<address_id>\d+)/$', views.UpdateDestoryAddressView.as_view()),
    # 设置默认地址
    url(r'^addresses/(?P<address_id>\d+)/default/$', views.DefaultAddressView.as_view()),
    # 更新地址标题
    url(r'^addresses/(?P<address_id>\d+)/title/$', views.UpdateTitleAddressView.as_view()),
    #用户商品2浏览记录
    url(r'^browse_histories/$',views.UserBrowseHistory.as_view()),

]
